import { rootState } from "@/store";
import { message } from "antd";
import React, { useEffect } from "react";
import { shallowEqual, useSelector } from "react-redux";

export default function Glogalmessage() {
  const { global } = useSelector(
    (store: rootState) => ({
      global: store.global,
    }),
    shallowEqual
  );
  useEffect(() => {
    if (global.message) message.warn(global.message);
  }, [global.message]);
  return <></>;
}
